package router

import (
	"github.com/gofiber/fiber/v2"
	v1 "no-watermark/app/api/v1"
)

func NewRouter(r *fiber.App) {
	new(v1.Index).NewRouter(r)
	//设置not found 页面
	r.Use(NotFound)
}

// NotFound 404 not found
func NotFound(ctx *fiber.Ctx) error {
	return ctx.JSON(fiber.Map{
		"code": "500",
		"msg":  "page not found!",
	})
}
